#pragma once


#include "IXFrame.h"
#include "IXMenuPre.h"
#include "IXTimer.h"
#include <set>

class CGlobalSkinData : public IXTimer
{
public:
    CGlobalSkinData();
    ~CGlobalSkinData();

public:
    void        SetCapture(IXFrame* pCapture);
    IXFrame*    GetCapture();

    void        SetTrackPopupMenu(IXMenuPre* pPopup);
    IXMenuPre*     GetTrackPopupMenu();

    void        QueryControlToRelease(IXControl* pControl);

    void        FilterDragdropMsg(BOOL bEnable);

public:
    // IXTimer
    virtual void STDMETHODCALLTYPE   OnTimer(UINT_PTR uTimerId, void* pData);

protected:
    void        DestroyReleaseQueue();

protected:
    IXFrame*        m_pCapture;
    IXMenuPre*         m_pPopup;

    UINT_PTR        m_nReleaseTimerId;
    typedef std::set<IXControl*> ReleaseQueue;
    ReleaseQueue    m_ReleaseQueue;

    INT             m_uFilterDragdropMsgCount;
};
